<template>
  <div class="add-avatar inline-block margin-left margin-right">
    <el-button
      type="text"
      size="mini"
      class="color-darkblue"
      @click="visible = true"
      >设置</el-button
    >
    <el-dialog
      append-to-body
      title="设置头像"
      width="500px"
      :visible.sync="visible"
    >
      <cropper-avatar @cancle="visible = false" v-model="form"></cropper-avatar>
    </el-dialog>
  </div>
</template>

<script>
import cropperAvatar from "../cropperAvatar/index.vue";
import vModelMixins from "../../mixins/vModelMixins";

export default {
  name: "add-avatar",
  mixins: [vModelMixins],
  components: { cropperAvatar },
  data() {
    return {
      visible: false
    };
  }
};
</script>
